﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using ADO_QLNS.Utils;

namespace BUS_QLNS
{
    // DataConfig la 1 class kieu singleton pattern
    // Muc dich: load thong tin cau hinh 1 lan duy nhat luc phan mem khoi dong
    public class DataConfigLoader
    {
        private static DataConfigLoader _Instance = new DataConfigLoader();
        public static DataConfigLoader GetInstance
        {
            get { return _Instance; }
        }
        private DataConfigLoader()
        {
            cfgReader = new ConfigReader();
        }

        public void LoadConfig(string FilePath)
        {
            // Init config reader
            cfgReader.InitReader(FilePath);
            // Load config reader
            cfgReader.LoadConfig();
        }

        private ConfigReader cfgReader;
    }
}
